local hx__youli = fk.CreateSkill {
  name = "hx__youli",
}

hx__youli:addEffect("active", {
  anim_type = "offensive",
  card_num = 0,
  target_num = 1,
  prompt = "#hx__youli-prompt",
  can_use = function(self, player)
    return player:usedSkillTimes(hx__youli.name, Player.HistoryPhase) == 0 and player:hasSkill(hx__youli.name)
  end,
  target_filter = function(self, player, to_select, selected, selected_cards)
    return #selected == 0 and player:distanceTo(to_select) == 1
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    room:damage({
      from = player,
      to = to,
      damage = 1,
      skillName = hx__youli.name,
    })
  end,
})

return hx__youli